package org.wdcode.news.action.articles;

import org.wdcode.common.util.DateUtil;
import org.wdcode.news.action.BaseNewsHelperAdviceAction;
import org.wdcode.news.po.Articles;
import org.wdcode.news.service.ArticlesService;

/**
 * 文章Action
 * @author WD
 * @since JDK6
 * @version 1.0 2010-05-13
 */
public class ArticlesAction extends BaseNewsHelperAdviceAction<ArticlesService, Articles> {
	// 序列化 ID
	private static final long	serialVersionUID	= -1516425249784600706L;

	/**
	 * 添加
	 */
	@Override
	public String add() throws Exception {
		// 设置创建人
		getEntity().setUserId(getUserId());
		// 设置创建时间
		getEntity().setCreateDate(DateUtil.getTime());
		// 调用父方法
		return super.add();
	}
}
